package 搜索旋转排序数组;

import java.util.HashMap;

public class solution1 {
    public int search(int[] nums, int target) {
        HashMap<Integer, Integer> Hashset = new HashMap<>();
        for (int i = 0; i < nums.length; i++) {
            Hashset.put(nums[i],i);
        }
        for (int i = 0; i < nums.length; i++) {
            if(Hashset.containsKey(target)) return Hashset.get(target);
        }
        return -1;
    }
}
